<div class="dialog-container mdl-shadow--8dp mdl-layout--fixed-header SMES-dialog badReadson-dialog" ng-init="init();"  style="background-color: #fafafa; ">
    <div class="kmi-header-row">
        <div class="header-title" ng-bind="'B0217.badReason.title' | translate"></div>
        <div class="kmi-side-btn right" ng-click="dialog.back();">
            <img src="image/icons/clear.png"></img>
            <div class="kmi-can-click"></div>
        </div>
    </div>
    <div class="kmi-layout-main-content">
        <div class="kmi-layout-page badReason">
            <div class="kmi-text-fields">
                <label class="label" ng-bind="'B0217.badReason.prodPatchNo'|translate"></label>
                <label class="value" style="flex:1;" ng-bind="dialog.plot_no"></label>
                <label class="label" ng-bind="'B0217.badReason.badReasonType' | translate" style="text-align: right;"></label>
                <input ng-model="dialog.tmpBadTypeName" ng-click="dialog.loadBadTypeList()" readonly="readonly" style="margin-right: 36px;">
                <div class="tip" style="right: 64px;"><i class="material-icons">&#xE5CF;</i></div>
            </div>
            <div class="kmi-text-fields">
                <label class="label" ng-bind="'B0217.badReason.badReason' | translate"></label>
                <input ng-model="dialog.tmpBadReason.reason_name" ng-click="dialog.loadBadReasonList()" readonly="readonly">
                <div class="tip"><i class="material-icons">&#xE5CF;</i></div>
                <label class="label" ng-bind="'B0217.badReason.badQty' | translate" style="text-align:right"></label>
                <input mdl-calculater="dialog.tmpAbnormal_qty" mdl-calculater-decimal="true" style="margin-right:4px;">
                <button class="mdl-button mdl-js-button mdl-button--icon mdl-button--icon_prime" ng-click="dialog.addBadReason()">
                    <img src="image/icons/add.png"></img>
                </button>
            </div>
            <div class="kmi-list">
                <div class="kmi-list__header">
                    <div class="kmi-list__column" style="flex:1;" ng-bind="'B0217.badReason.reason_type' | translate" ></div>
                    <div class="kmi-list__column" style="flex:1;" ng-bind="'B0217.badReason.reason' | translate" ></div>
                    <div class="kmi-list__column" style="flex:0 0 104px;" ng-bind="'B0217.badReason.badNo' | translate" ></div>
                    <div class="kmi-list__column" style="flex:0 0 104px;" ng-bind="'B0217.badReason.badQty_0' | translate" ></div>
                    <div class="kmi-list__column" style="flex:0 0 32px;"></div>
                </div>
                <div class="kmi-list__row-content">
                    <div class="kmi-list__row" ng-repeat="item in dialog.badReasonInfo track by $index">
                        <div class="kmi-list__column column-border" style="flex:1;" ng-bind="item.abnormal_type_name"></div>
                        <div class="kmi-list__column column-border" style="flex:1;" ng-bind="item.abnormal_name"></div>
                        <div class="kmi-list__column column-border" style="flex:0 0 104px;" ng-bind="item.abnormal_no"></div>
                        <div class="kmi-list__column" style="flex:0 0 104px;" ng-bind="item.defect_qty"></div>
                        <div class="kmi-list__column" style="flex:0 0 32px;">
                            <button class="mdl-button mdl-js-button mdl-button--icon" ng-click="dialog.removeBadReason(item)">
                                <img  src="image/icons/delete1.png"></img>
                            </button>
                        </div>
                    </div>
                </div>
            </div>
            <div class="search-tool">
                <div class="kmi-button kmi-button-confrim btn-confirm" ng-click="dialog.confirm()"  style="width:100px">
                    <label ng-bind="'common.btn.confirm' | translate"></label>
                    <div class="kmi-can-click" ></div>
                </div>
                <!--
                <div class="kmi-button kmi-button-cancel"   ng-click="dialog.badReasonCancel(dialog)" style="width:100px">
                    <label ng-bind="'common.btn.close' | translate"></label>
                    <div class="kmi-can-click"></div>
                </div>
                -->
            </div>
        </div>
    </div>
</div>
